package university.dropcourse.conversion;

import javax.ejb.LocalBean;
import javax.ejb.Stateless;

import university.dropcourse.dto.StudenteDto;
import university.dropcourse.entity.Studente;


/**
 * Generated class university.dropcourse.conv.StudenteConv
 */
@LocalBean
@Stateless
public class StudenteConv {

    private static final long serialVersionUID = 1L;

    public StudenteConv() { }

    public StudenteDto fromEntity(Studente in) {
        StudenteDto result = new StudenteDto();
        
        result.setCognome(in.getCognome());
        result.setCorsiIds(null);
        result.setEmail(in.getEmail());
        result.setId(in.getId());
        result.setMatricola(in.getMatricola());
        result.setNome(in.getNome());
        result.setPassword(in.getPassword());

        return result;
    }

    public Studente fromDto(StudenteDto in) {
        Studente result = new Studente();
      
        result.setCognome(in.getCognome());
        result.setCorsi(null);
        result.setEmail(in.getEmail());        
        result.setId(in.getId());       
        result.setMatricola(in.getMatricola());
        result.setNome(in.getNome());
        result.setPassword(in.getPassword());

        return result;
    }

}